import hilog from '@ohos.hilog';

export default class Utils {

    /**
     * 封装提示打印
     * @param str
     */
    myLog(str: String) {
        hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO);
        hilog.info(0x0000, 'testTag', '%{public}s', str);
    }

    /**
     * 封装错误打印
     * @param str
     */
    myErrLog(err: String) {
        hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR);
        hilog.error(0x0000, 'testTag', 'Failed Cause: %{public}s', err);
    }
}